SHELL = @SHELL@
CC    = @CC@
F77   = @F77@
CXX   = @CXX@
F90   = @F90@
MAKE  = @MAKE@
LIBS  = @LIBS@
MPIRUN= @MPIRUN@
NP_ARG= @NP_ARG@

all: all-redirect

PROGRAMS = io0 io1 io2 io3 io3f io35 io35cc io4 pcp

PROGRAMS2 = cpi-rma pcp-spawn-master pcp-spawn-slave pcp-master pcp-slave 

io0_SOURCES = io0.c

SOURCES = io0.c io1.c io2.c io3.c io3f.f90 io35.c io35cc.cc io4.c pcp.c \
	  cpi-rma.c pcp-spawn-master.c pcp-spawn-slave.c pcp-master.c \
	  pcp-slave.c

all-redirect: ${PROGRAMS}

clean:
	rm -f *.o ${PROGRAMS} *~ PI*

.SUFFIXES: .o .c .f .cc .f90
.c:
	${CC} ${CFLAGS} -o $* $< ${LIBS} 
.c.o:
	${CC} ${CFLAGS} -c $<
.f:
	${F77} ${FFLAGS} -o $* $< ${LIBS}
.f.o:
	${F77} ${FFLAGS} -c $<
.f90:
	${F90} ${F90FLAGS} -o $* $< ${LIBS}
.cc:
	${CXX} ${CXXFLAGS} -o $* $< ${LIBS} 

run: ${PROGRAMS}
	${MPIRUN} ${NP_ARG} 4 xxx

sources:
	@echo ${SOURCES}
